<?php

use App\Models\ProjectManage\CheckOption;
use Illuminate\Database\Seeder;

class CheckOptionTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run () {
        $data = [
            ['name' => '端口扫描结果', 'opt_type' => 1],
            ['name' => '中间件漏洞', 'opt_type' => 0],
            ['name' => '服务器漏洞', 'opt_type' => 0],
            ['name' => '账户相关漏洞', 'opt_type' => 0],
            ['name' => '业务相关漏洞', 'opt_type' => 0],
            ['name' => '支付相关漏洞', 'opt_type' => 0],
            ['name' => '外网信息泄露', 'opt_type' => 0],
            ['name' => '其他', 'opt_type' => 0]
        ];
        foreach ($data as $item) {
            $item['title'] = $item['keywords'] = $item['description'] = $item['name'];
            CheckOption::updateOrCreate(['name'=>$item['name']],$item);
        }
    }
}
